Skip to content

Fix native_libs.txt - #16

Merged
wjakob merged 1 commit into
pybind:masterfrom
ax3l:fix-extDirNativeLibs
Mar 31, 2020
Merged

wjakob merged 1 commit into
pybind:masterfrom
ax3l:fix-extDirNativeLibs

Conversation

@ax3l

@ax3l ax3l commented Sep 25, 2018 •

Copy link
Copy Markdown
Contributor

When building additional, auxiliary libraries they should receive proper handling in "native_libs.txt". Surprisingly, this only happens when a trailing / is added.

Also, together with the primary module the (shared) libs will then go into the package directory instead of lying somewhere in the base path.

native_libs.txt also takes care, that these auxiliary, non-python, "native" libs are properly deinstalled as well.

Additional RPATH/RUNPATH handling for auxiliary, "native" libs is likely needed. E.g. on Linux when placing them all in the same base path ($ORIGIN is not a bash variable) of the package:

            '-DCMAKE_INSTALL_RPATH=$ORIGIN',
            '-DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON',
            '-DCMAKE_INSTALL_RPATH_USE_LINK_PATH:BOOL=OFF',

while on Windows one can just keep a flat structure in the package, which will be in %PATH% for the primary module and its helper .dlls.

Larger project example: openPMD/openPMD-api#240

When building additional, auxiliary libraries they should receive
proper handling in "native_libs.txt". Surprisingly, this only
happens when a trailing `/` is added.

Also, the primary module will then go into the package directory.

Additional `RPATH`/`RUNPATH` handling for auxiliary, "native" libs
is likely needed. E.g. on Linux/OSX:

```
            '-DCMAKE_INSTALL_RPATH=$ORIGIN',
            '-DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON',
            '-DCMAKE_INSTALL_RPATH_USE_LINK_PATH:BOOL=OFF',
```

while on Windows one can just keep a flat structure in the package,
which will be in `%PATH%`.
@leimao

leimao commented Feb 20, 2020

Copy link
Copy Markdown

This pull request got no responses?

@ax3l

ax3l commented Feb 22, 2020 •

Copy link
Copy Markdown
Contributor Author

I know, right? :)

ping @dean0x7d and @SylvainCorlay

@ax3l

ax3l commented Mar 31, 2020

Copy link
Copy Markdown
Contributor Author

@dean0x7d @wjakob who can merge this PR? Fixes #18 among other linked issues :)

@wjakob

wjakob commented Mar 31, 2020

Copy link
Copy Markdown
Member

Sure, sorry about the delay.

@wjakob
wjakob merged commit 70f17a8 into pybind:master Mar 31, 2020
@ax3l
ax3l deleted the fix-extDirNativeLibs branch March 31, 2020 15:59
@ax3l

ax3l commented Mar 31, 2020

Copy link
Copy Markdown
Contributor Author

No problem, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants